package com.设计模式.单例模式.懒汉式;

/**
 * @author: LCG
 * 作者: LCG
 * 日期: 2021/3/1  13:23
 * 描述:
 */
public class TestLanHan {

    private volatile static TestLanHan testLanHan=null;

    private TestLanHan() {
    }

    public static TestLanHan getTestLanHanInstance(){
            if(testLanHan==null){
                synchronized (TestLanHan.class){
                    if(testLanHan==null){
                        testLanHan=new TestLanHan();
                    }
                }
                return testLanHan;
            }else{
                return testLanHan;
            }
    }
}
